<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="mapList" value="${requestScope.mapList}" />
<c:set var="scoreViewList" value="${requestScope.scoreViewList}" />
<c:set var="srmList" value="${requestScope.srmList}" />
<c:set var="projectList" value="${requestScope.projectList}" />
<div id="leftBar" class="box1">
    <c:if test="${fn:length(mapList)>0}">
        <div id="nav-mapas" class="accordionHeader">
            <span>Mapas</span>
        </div>
        <div class="accordionContent">
            <ul>
                <c:forEach var="map" items="${mapList}">
                    <li style="margin-bottom:0.5em"><a href="mapFinalUser.do?map=${map.idScoreCard}"><c:out value="${map.name}" /></a></li>
                </c:forEach>
            </ul>
        </div>
    </c:if>
    <c:if test="${fn:length(scoreViewList) > 0}">
        <div id="nav-vistas" class="accordionHeader">
            <span>Vistas</span>
        </div>
        <div class="accordionContent">
            <ul>
                <c:forEach var="scoreView" items="${scoreViewList}">
                    <li style="margin-bottom:0.5em"><a href="mainFinalUser.do?rootScoreCard=${scoreView.scoreCard.idScoreCard}"><c:out value="${scoreView.name}" /></a></li>
                </c:forEach>
            </ul>
        </div>
    </c:if>
    <%--
    <div id="nav-reportes" class="accordionHeader">
        <span>Reportes</span>
    </div>
    <div class="accordionContent">
        <ul>
          <c:forEach var="report" items="${reportList}">
           <li style="margin-bottom:0.5em">${report}</li>
          </c:forEach>
        </ul>
    </div>
    --%>
    <c:if test="${fn:length(srmList)>0}">
        <div id="nav-raes" class="accordionHeader">
            <span>RAE's</span>
        </div>
        <div class="accordionContent">
            <ul>
                <c:forEach var="srm" items="${srmList}">
                    <li style="margin-bottom:0.5em"><a href="SRMFinalUser.do?srm=${srm.idSRM}">${srm.name}</a></li>
                </c:forEach>
            </ul>
        </div>
    </c:if>
    
    <c:if test="${fn:length(projectList)>0}">
        <div id="nav-proyectos" class="accordionHeader">
            <span>Proyectos</span>
        </div>
        <div class="accordionContent">
            <ul>
                <c:forEach var="project" items="${projectList}">
                    <li style="margin-bottom:0.5em"><a href="mainFinalUser.do?rootScoreCard=${project.idScoreCard}">${project.name}</a></li>
                </c:forEach>
            </ul>
        </div>
    </c:if>
    
</div>